home *** CD-ROM | disk | FTP | other *** search
- global gMyWinList, gTheWindowRect, gMyQTwindow, gQTWinActive, gwinCheck, gWinListNum, gTheName, gTheNewWinht, gTheNewWinwd, gMyWinTracker, gMyWindow, gtheLockList, gImageList, gthumbn1spr, gthumbn2spr, gthumbn3spr, gthumbn4spr, gthumbn5spr, gVideoName, gPDL, gtheWord, gWinType, gNewCaption, gCaptionList, gAssetPath, gComputerTypeK, gthumbholdcst, gTrekCursor, oWinKey, gModeState, gActiveResTopWin, gActiveTopWin, gMacColorIsHere, gWinTypeList, gActiveWin, glinktostagemsg, gLockWinStorage, oPWin, gVidIsPlaying, gWinOffSet, gLastWinLeft, gLastWinTop, gSpriteList, gWinLocRootT, gWinLocRootL, gWinLocCounter, gLastResWinLeft, gLastResWinTop
-
- on hActivateMIAW theTitleFile, n
- cursor(4)
- setaProp(gMyWinList, n, theTitleFile)
- set the windowType of window getAt(gMyWinList, n) to gWinType
- set the title of window getAt(gMyWinList, n) to EMPTY
- set theSL to gLastWinLeft
- set theST to gLastWinTop
- if (n > 0) and (n < 11) then
- hSetThePict()
- set thewinht to gTheNewWinht
- set thewinwd to gTheNewWinwd
- set offSetL to theSL
- set offSetT to theST
- else
- hSetTheVideo()
- set thewinht to 212
- set thewinwd to 272
- set offSetL to 362
- set offSetT to 197
- end if
- set theRect to rect(offSetL, offSetT, thewinwd + offSetL, thewinht + offSetT)
- set the rect of window getAt(gMyWinList, n) to theRect
- cursor([gTrekCursor, gTrekCursor + 1])
- end
-
- on hgetCaption
- set gCaptionList to [:]
- sort(gCaptionList)
- set vwhichlist to hCapitalize(char 1 of gTheName)
- set vwhichlist to charToNum(vwhichlist)
- if vwhichlist <= charToNum("D") then
- set gCaptionList to value(the text of cast "Captxt_1")
- else
- if (vwhichlist >= charToNum("E")) and (vwhichlist <= charToNum("N")) then
- set gCaptionList to value(the text of cast "Captxt_2")
- else
- if (vwhichlist >= charToNum("O")) and (vwhichlist <= charToNum("U")) then
- set gCaptionList to value(the text of cast "Captxt_3")
- else
- if (vwhichlist >= charToNum("V")) and (vwhichlist <= charToNum("Z")) then
- set gCaptionList to value(the text of cast "Captxt_4")
- end if
- end if
- end if
- end if
- if not objectp(gCaptionList) then
- end if
- set gNewCaption to getaProp(gCaptionList, gTheName)
- if voidp(gNewCaption) then
- set gNewCaption to " "
- end if
- end
-
- on hGetVidCap
- set gCaptionList to [:]
- sort(gCaptionList)
- set gCaptionList to value(the text of cast "Captxt_Vid")
- if not objectp(gCaptionList) then
- end if
- set gNewCaption to getaProp(gCaptionList, gTheName)
- if voidp(gNewCaption) then
- set gNewCaption to " "
- end if
- end
-
- on hGetResCap
- set gCaptionList to [:]
- sort(gCaptionList)
- set gCaptionList to value(the text of cast "Captxt_res")
- if not objectp(gCaptionList) then
- end if
- set gNewCaption to getaProp(gCaptionList, gTheName)
- if voidp(gNewCaption) then
- set gNewCaption to " "
- end if
- end
-
- on hSetThePict
- tell window getAt(gMyWinList, gWinListNum)
- mSetBlankCast(oPWin)
- end tell
- tell window getAt(gMyWinList, gWinListNum)
- mDisplayPict(oPWin)
- end tell
- end
-
- on hSetTheVideo
- tell window getAt(gMyWinList, gWinListNum)
- hDisplayVideo()
- end tell
- end
-
- on hRestorePicon pIndexNum
- global gPicWinNum, gthumbnRefspr
- if not ((getAt(gWinTypeList, value(gPicWinNum)) = #Resources) or (getAt(gWinTypeList, value(gPicWinNum)) = #CLOSED)) then
- set vImToFind to getAt(gImageList, value(gPicWinNum))
- repeat with aa = gthumbn1spr to gthumbn5spr
- set LpiconName to chars(the name of cast the castNum of sprite aa, 1, 7)
- if LpiconName = vImToFind then
- set the visible of sprite getAt(gSpriteList, value(gPicWinNum)) to 1
- end if
- end repeat
- end if
- end
-
- on hHideOpenPicons
- repeat with bb = gthumbn1spr to gthumbn5spr
- set Lmynum to the castNum of sprite bb
- if Lmynum = gthumbholdcst then
- exit
- end if
- set LpiconName to chars(the name of cast Lmynum, 1, 7)
- repeat with yy = 1 to 10
- if LpiconName = getAt(gImageList, yy) then
- set the visible of sprite bb to 0
- end if
- end repeat
- end repeat
- end
-
- on hFindCaptionWord
- if gtheWord <> EMPTY then
- set gtheWord to hcleanup(gtheWord)
- set the text of cast "SearchTextCandidate" to string(gtheWord)
- set the selStart to 0
- set the selEnd to the number of chars in gtheWord
- end if
- end
-
- on hFindCaptionLine
- global gtheLine
- if gtheLine <> EMPTY then
- set vtheLineLength to the number of chars in gtheLine
- if charToNum(char vtheLineLength of gtheLine) = 9 then
- set vtheLineLength to vtheLineLength - 1
- set gtheLine to chars(gtheLine, 1, vtheLineLength)
- end if
- set vtheLineLength to the number of chars in gtheLine
- set vLessFive to vtheLineLength - 5
- set vChunk to chars(gtheLine, vLessFive, vtheLineLength)
- if (vChunk contains "TOS") or (vChunk contains "TNG") or (vChunk contains "DS9") or (vChunk contains "VGR") then
- set gtheLine to char 1 to vLessFive of gtheLine
- end if
- set gtheLine to hcleanup(gtheLine)
- set the text of cast "SearchTextCandidate" to string(gtheLine)
- set the selStart to 0
- set the selEnd to the number of chars in gtheLine
- end if
- end
-
- on ShowMe
- put "gImageList = " & gImageList
- put "gWinListNum S = " & gWinListNum
- put "gMyWinTracker = " & gMyWinTracker
- put "gMyWinList = " & gMyWinList
- put "gtheLockList = " & gtheLockList
- put "The WindowList = " & the windowList
- end
-
- on hClearWindows
- set the windowList to []
- end
-
- on hOpenResourcePict pResPictName
- hOpenWhichResImage(pResPictName)
- hGetPICTWinNum()
- updateStage()
- hGetResCap()
- if getAt(gMyWinTracker, gWinListNum) = 0 then
- if (gWinListNum > 0) and (gWinListNum < 11) then
- hActivateResMIAW(the pathName & "BL" & gPDL & gWinListNum & "PicWn.dir", gWinListNum)
- end if
- set vNewWinName to getAt(gMyWinList, gWinListNum)
- open(window vNewWinName)
- hCallOmniColor()
- moveToFront(window vNewWinName)
- tell window vNewWinName
- mStartUp(oPWin)
- end tell
- tell window vNewWinName
- mSetbasicWinKeys(oWinKey, window vNewWinName)
- end tell
- tell window vNewWinName
- mSetBasicMouseUp(oWinKey, window vNewWinName)
- end tell
- set gLastResWinLeft to getAt(the rect of window vNewWinName, 1) + gWinOffSet
- set gLastResWinTop to getAt(the rect of window vNewWinName, 2) + gWinOffSet
- tell window vNewWinName
- mSetbasicWinKeys(oWinKey, window vNewWinName)
- end tell
- hCheckWinLocCounter()
- end if
- end
-
- on hCallOmniColor
- if gComputerTypeK = #mac then
- OmniColor()
- end if
- end
-
- on hActivateResMIAW theTitleFile, n
- cursor(4)
- setaProp(gMyWinList, n, theTitleFile)
- set the windowType of window getAt(gMyWinList, n) to gWinType
- set the title of window getAt(gMyWinList, n) to EMPTY
- set theSL to gLastResWinLeft
- set theST to gLastResWinTop
- if (n > 0) and (n < 11) then
- hSetThePict()
- set thewinht to gTheNewWinht
- set thewinwd to gTheNewWinwd
- set offSetL to theSL
- set offSetT to theST
- end if
- set theRect to rect(offSetL, offSetT, thewinwd + offSetL, thewinht + offSetT)
- if (getAt(theRect, 3) > 640) and (getAt(theRect, 4) > 480) then
- set vOffsetH to getAt(theRect, 3) - 630
- set vOffsetV to getAt(theRect, 3) - 470
- set theRect to rect(offSetL - vOffsetH, offSetT - vOffsetV, thewinwd + offSetL - vOffsetH, thewinht + offSetT - vOffsetV)
- else
- if getAt(theRect, 3) > 640 then
- set vOffsetH to getAt(theRect, 3) - 630
- set theRect to rect(offSetL - vOffsetH, offSetT, thewinwd + offSetL - vOffsetH, thewinht + offSetT)
- else
- if getAt(theRect, 4) > 480 then
- set vOffsetV to getAt(theRect, 3) - 470
- set theRect to rect(offSetL, offSetT - vOffsetV, thewinwd + offSetL, thewinht + offSetT - vOffsetV)
- end if
- end if
- end if
- set the rect of window getAt(gMyWinList, n) to theRect
- cursor([gTrekCursor, gTrekCursor + 1])
- end
-
- on hCheckWinLocCounter
- if gWinLocCounter = 10 then
- set gLastWinLeft to gWinLocRootL
- set gLastWinTop to gWinLocRootT
- set gLastResWinLeft to gWinLocRootL
- set gLastResWinTop to gWinLocRootT
- set gWinLocCounter to 1
- else
- set gWinLocCounter to gWinLocCounter + 1
- end if
- end
-
- on hdumpwinglobs
- put "gMyWinList=" & gMyWinList
- put "gTheWindowRect=" & gTheWindowRect
- put "gMyQTwindow=" & gMyQTwindow
- put "gQTWinActive=" & gQTWinActive
- put "gwinCheck=" & gwinCheck
- put "gWinListNum=" & gWinListNum
- put "gTheName=" & gTheName
- put "gTheNewWinht=" & gTheNewWinht
- put "gTheNewWinwd=" & gTheNewWinwd
- put "gMyWinTracker=" & gMyWinTracker
- put "gMyWindow=" & gMyWindow
- put "gtheLockList=" & gtheLockList
- put "gImageList=" & gImageList
- put "gTheWord=" & gtheWord
- put "gWinType=" & gWinType
- put "oWinkey=" & oWinKey
- put "gActiveResTopWin=" & gActiveResTopWin
- put "gActiveTopWin=" & gActiveTopWin
- put "gWinTypeList=" & gWinTypeList
- put "gActiveWin=" & gActiveWin
- put "gLinkToStageMsg=" & glinktostagemsg
- put "gLockWinStorage=" & gLockWinStorage
- put "gVidIsPlaying=" & gVidIsPlaying
- put "gWinOffset=" & gWinOffSet
- put "gLastWinLeft=" & gLastWinLeft
- put "gLastWinTop=" & gLastWinTop
- put "gSpriteList=" & gSpriteList
- put "gWinLocRootT=" & gWinLocRootT
- put "gWinLocRootL=" & gWinLocRootL
- put "gWinLocCounter=" & gWinLocCounter
- put "gLastResWinLeft=" & gLastResWinLeft
- put "gLastResWinTop=" & gLastResWinTop
- end
-